package com.jk.service;

import com.jk.pojo.PostBean;
import com.jk.pojo.UserBean;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

//定义一个feign接口，通过@ FeignClient（“服务名”），来指定调用哪个服务
//value ‐‐‐>指定调用哪个服务
@FeignClient(value = "provider")
public interface UserService {
    @GetMapping("log/text")
    String text();


    @GetMapping("log/loginUser")
    Map<String, String> loginUser(@RequestParam String name,@RequestParam  String password);
    @GetMapping("log/SessUser")
    UserBean SessUser(@RequestParam String name);
    @PostMapping("log/addUser")
    void addUser(UserBean w);
    @GetMapping("log/selectAdmin")
    List<UserBean> selectAdmin();
    @GetMapping("log/selectPort")
    List<PostBean> selectPort();
    @PostMapping("log/addPost")
    void addPost(PostBean e);

}
